/********************* SETTINGS *********************/
//  Depends: modal.js
//  Depends: database-localstorage.js

var Bistre = Bistre || {};
var Bistre.MobileBookCatalog = Bistre.MobileBookCatalog || {};

Bistre.MobileBookCatalog.Settings.prototype.constructor = ApplicationSettings();

Bistre.MobileBookCatalog.Settings.prototype.init = function(options){
	this.load();
	var s = $.extend({}, this, options);
}
  
Bistre.MobileBookCatalog.Settings.prototype.save = function() {
    if (!supportsLocalStorage()) { return false; }
    localStorage["settings.importType"] = this.importType;
    localStorage["settings.importUrl"] = this.importUrl;
    localStorage["settings.lastImportUrl"] = this.lastImportUrl;
    localStorage["settings.lastImportTime"] = this.lastImportTime;
    return true;
}
  
Bistre.MobileBookCatalog.Settings.prototype.load = function() {
    if (!supportsLocalStorage()) { return false; }
    this.importType = localStorage["settings.importType"];
    this.importUrl = localStorage["settings.importUrl"];
    this.lastImportUrl = localStorage["settings.lastImportUrl"];
    this.lastImportTime = localStorage["settings.lastImportTime"];
    return true;
}